// TOWN SCRIPT
//    Town 4: Valley Entrance

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documentation. States you write
// yourself should be numbered from 10-100.

begintownscript;

variables;

body;

beginstate INIT_STATE;
// Called upon entering

set_character_facing(1000,0);
force_instant_terrain_redraw();

reset_dialog();
add_dialog_str(0,"You enter Twilight Valley for the first time, and are immediately stunned by your surroundings. The place is beautiful. The sky above is clear, and the sun is shining fiercely.",0);
add_dialog_str(1,"Tall birches are clumped together along the edges of the valley walls, and about your feet a multitude of flowers push up from the ground. There are also some taller flowers - lilacs, from the looks of them - which sweetly fragrance the air.",0);
add_dialog_str(2,"It's impossible not to be in good spirits right now - your surroundings make sure of that. This place is a far cry from the swamps you passed through to get here.",0);
run_dialog(1);

break;

beginstate EXIT_STATE;
// Always called when the town is left.
break;

beginstate START_STATE;
// Called every turn.

break;

//Leaving scenario
beginstate 10;
	reset_dialog();
	add_dialog_str(0,"If you carry on going in this direction, you will soon leave the Valley behind. You haven't, however, completed your mission. Do you stay or do you go?",0);
	add_dialog_choice(0,"Stay in Twilight Valley.");
	add_dialog_choice(1,"Leave Twilight Valley.");
	if(run_dialog(1) == 1) {
		message_dialog("You turn around. You have things to do here before leaving.","");
		block_entry(1);
	} else {
		message_dialog("You start walking. Before long you have reached the town you started out from, and from there, you are quickly on your way to new and exciting adventures.","THE END");
		end_scenario(0);
		}
break;